package net.borlis.server.filesystem.api;

import javax.speech.synthesis.SynthesizerModeDesc;
import javax.speech.synthesis.Voice;

/**
 * Created by borlis on 26.12.2014.
 */
public class Voize {

    private javax.speech.synthesis.Voice voice;

    public Voize(String voiceName, SynthesizerModeDesc smd) {
        javax.speech.synthesis.Voice[] voices = smd.getVoices();
        javax.speech.synthesis.Voice voice = null;
        for (int i = 0; i < voices.length; i++) {
            if (voices[i].getName().equals(voiceName)) {
                this.voice = voices[i];
                break;
            }
        }
    }

    public Voice getVoice() {
        return voice;
    }
}
